def test_create_user(api_client):
    """测试创建用户"""
    # 准备测试数据
    user_data = {
        "name": "测试用户",
        "email": "test@example.com",
        "password": "P@ssw0rd"
    }

    # 发送请求（自动记录日志）
    response = api_client.post("users/", json=user_data)

    # 验证响应
    assert response.status_code == 201
    response_data = response.json()
    assert response_data["status_code"] == 'success'


# def test_get_user(api_client):
#     """测试获取用户信息"""
#     # 使用带状态检查的方法
#     user_data = api_client.get_json("GET", "users/123/", expected_status=200)
#
#     # 验证数据结构
#     assert isinstance(user_data, dict)
#     assert "id" in user_data
#     assert "name" in user_data
#     assert "email" in user_data
